<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">

  <title>Dashboard Template for Bootstrap</title>
  <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
  <link th:href="@{/css/dashboard.css}" rel="stylesheet">
  <link th:href="@{/css/common.css}" rel="stylesheet">

</head>

<body>
<!--导航栏-->
<div th:insert="~{commons/commons::navbar}"></div>

<div class="container-fluid">
  <div class="row">

    <!--侧边栏-->
    <div th:insert="~{commons/commons::sidebar(active='carManage')}"></div>


    <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4" >
      <div th:if="${code!=10000}" th:text="${message}"> </div>
      <div th:if="${code}==10000">
        <div class="m-tb-lg text-xl">车辆管理</div>


        <div class="m-t-lg">
          <div class="d-inline-block box-big m-l-md">
            <div class="text-lg ">车牌号</div>
            <input class="form-control" type="text" readonly th:value="${data.getPlate_code()}">
          </div>
        </div>

        <div class="m-t-lg">
            <div class="d-inline-block box-big m-l-md">
              <div class="text-lg">类型</div>
              <input class="form-control" type="text" readonly th:value="${data.getType_name()?:'-'}">
            </div>

            <div class="d-inline-block box-big m-l-md">
              <div class="text-lg ">品牌</div>
              <input class="form-control" type="text" readonly th:value="${data.getBrand()?:'-'}">
            </div>

            <div class="d-inline-block box-big m-l-md">
              <div class="text-lg ">核载人数</div>
              <input class="form-control" type="text" readonly th:value="${data.getApproved_num()?:'-'}">
            </div>
          </div>

          <div class="m-t-lg">
            <div class="d-inline-block box-big m-l-md">
              <div class="text-lg ">状态</div>
              <input class="form-control" type="text" readonly th:value="${data.getState_name()?:'-'}">
            </div>

            <div class="d-inline-block box-big m-l-md">
              <div class="text-lg ">备注</div>
              <input class="form-control" type="text" readonly th:value="${data.getMemo()?:'-'}">
            </div>
          </div>

          <div class="m-t-lg">
            <div class="d-inline-block box-big m-l-md">
              <div class="text-lg ">录入时间</div>
              <input class="form-control" type="text" readonly th:value="${#dates.format(data.getTime_add(),'yyyy-MM-dd HH:mm')?:'-'}">
            </div>

            <div class="d-inline-block box-big m-l-md">
              <div class="text-lg ">更新时间</div>
              <input class="form-control" type="text" readonly th:value="${#dates.format(data.getTime_update_last(),'yyyy-MM-dd HH:mm')?:'-'}">
            </div>
          </div>

      </div>

      <div th:if="${code!=10000}" th:text="${message}"></div>
      <div th:if="${code==10000}">
        <div class="d-inline-block m-t-lg m-l-md">
          <div class="text-lg m-b-md">使用用户</div>
          <table class="table table-striped table-sm">
            <thead>

            <tr>
              <th width="168px" height="36px" class="text-md">昵称</th>
              <th width="168px" height="36px" class="text-md">电话</th>
              <th width="168px" height="36px" class="text-md">状态</th>
            </tr>

            </thead>
            <tbody>
            <tr th:each="user:${carUser}">
              <td th:text="${user.getNickname()}" width="168px" height="24px" class="text-md"></td>
              <td th:text="${user.getPhone()}" width="168px" height="24px" class="text-md"></td>
              <td th:text="${user.getState_name()?:'-'}" width="168px" height="24px" class="text-md"></td>
            </tr>
            </tbody>
          </table>
        </div>

      </div>


    </main>

  </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" th:src="@{/js/jquery-3.5.1.slim.min.js}"></script>
<script type="text/javascript" th:src="@{/js/popper.min.js}"></script>
<script type="text/javascript" th:src="@{/js/bootstrap.min.js}"></script>

<!-- Icons -->
<script type="text/javascript" th:src="@{/js/feather.min.js}"></script>

</body>

</html>